/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * DailyReport.java
 *
 * Created on 05 Nov 11, 21:46:01
 */
package Com.MakeReport_Case;

import SistemPenyewaanKamar.MainController;

/**
 *
 * @author Yosefina
 */
public class DailyReportForm extends javax.swing.JDialog {

    /** Creates new form DailyReport */
    public DailyReportForm(java.awt.Frame parent, boolean modal) {
        super(parent, modal);
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        panelUtama = new javax.swing.JPanel();
        titleLabel = new javax.swing.JLabel();
        jSeparator1 = new javax.swing.JSeparator();
        tanggalTransaksiLabel = new javax.swing.JLabel();
        jScrollPane1 = new javax.swing.JScrollPane();
        kamarTable = new javax.swing.JTable();
        judulTabelLabel = new javax.swing.JLabel();
        vvipTextField = new javax.swing.JLabel();
        vipTextField = new javax.swing.JLabel();
        commonTextField = new javax.swing.JLabel();
        totalKamarLabel = new javax.swing.JLabel();
        jScrollPane2 = new javax.swing.JScrollPane();
        gedungTable = new javax.swing.JTable();
        judulTabelGedungLabel = new javax.swing.JLabel();
        jSeparator2 = new javax.swing.JSeparator();
        totalLabel = new javax.swing.JLabel();
        ballRoomLabel = new javax.swing.JLabel();
        meetingRoomLabel = new javax.swing.JLabel();
        vvipTotalIncomeLabel = new javax.swing.JLabel();
        vipTotalIncomeLabel = new javax.swing.JLabel();
        commonTotalIncomeLabel = new javax.swing.JLabel();
        kamarTotalIncomeLabel = new javax.swing.JLabel();
        ballRoomTotalIncomeLabel = new javax.swing.JLabel();
        meetingRoomTotalIncomeLabel = new javax.swing.JLabel();
        gedungTotalIncomeLabel = new javax.swing.JLabel();
        kembali_button = new javax.swing.JButton();
        tanggalTransaksiChooser = new com.toedter.calendar.JDateChooser();
        labelGambar = new javax.swing.JLabel();
        laporanHarianButton = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("Daily Report");

        panelUtama.setBackground(new java.awt.Color(255, 255, 255));

        titleLabel.setFont(new java.awt.Font("Tahoma", 0, 36)); // NOI18N
        titleLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        titleLabel.setText("Daily Report");

        tanggalTransaksiLabel.setText("Tanggal Transaksi");

        kamarTable.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null}
            },
            new String [] {
                "NO CHECKIN", "NOMOR KAMAR", "TANGGAL MASUK", "TANGGAL KELUAR", "TOTAL HARGA SEWA"
            }
        ));
        jScrollPane1.setViewportView(kamarTable);

        judulTabelLabel.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
        judulTabelLabel.setForeground(new java.awt.Color(255, 0, 51));
        judulTabelLabel.setText("Kamar");

        vvipTextField.setText("VVIP");

        vipTextField.setText("VIP");

        commonTextField.setText("COMMON");

        totalKamarLabel.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        totalKamarLabel.setText("Total Pedapatan Per Hari");

        gedungTable.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null}
            },
            new String [] {
                "NO TRANSAKSI", "TANGGAL SEWA", "JENIS GEDUNG", "JAM SEWA", "JAM KELUAR", "TOTAL TAGIHAN"
            }
        ) {
            boolean[] canEdit = new boolean [] {
                true, false, true, false, true, true
            };

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jScrollPane2.setViewportView(gedungTable);
        gedungTable.getColumnModel().getColumn(1).setResizable(false);

        judulTabelGedungLabel.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
        judulTabelGedungLabel.setForeground(new java.awt.Color(255, 0, 51));
        judulTabelGedungLabel.setText("Gedung");

        totalLabel.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        totalLabel.setText("Total Pedapatan Per Hari");

        ballRoomLabel.setText("BALL ROOM");

        meetingRoomLabel.setText("MEETING ROOM");

        kamarTotalIncomeLabel.setText(" ");

        gedungTotalIncomeLabel.setText(" ");

        kembali_button.setText("KEMBALI KE MENU MAIN FORM");
        kembali_button.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                kembali_buttonActionPerformed(evt);
            }
        });

        labelGambar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Com/MakeReport_Case/report2.gif"))); // NOI18N

        laporanHarianButton.setText("Buat Laporan Harian");
        laporanHarianButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                laporanHarianButtonActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout panelUtamaLayout = new javax.swing.GroupLayout(panelUtama);
        panelUtama.setLayout(panelUtamaLayout);
        panelUtamaLayout.setHorizontalGroup(
            panelUtamaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelUtamaLayout.createSequentialGroup()
                .addComponent(labelGambar)
                .addGap(28, 28, 28)
                .addComponent(titleLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 225, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(370, Short.MAX_VALUE))
            .addComponent(jSeparator1, javax.swing.GroupLayout.DEFAULT_SIZE, 774, Short.MAX_VALUE)
            .addGroup(panelUtamaLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(tanggalTransaksiLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 115, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(tanggalTransaksiChooser, javax.swing.GroupLayout.PREFERRED_SIZE, 151, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(laporanHarianButton)
                .addContainerGap(353, Short.MAX_VALUE))
            .addGroup(panelUtamaLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(judulTabelLabel)
                .addContainerGap(714, Short.MAX_VALUE))
            .addGroup(panelUtamaLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(panelUtamaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 754, Short.MAX_VALUE)
                    .addComponent(vvipTextField))
                .addContainerGap())
            .addGroup(panelUtamaLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(vipTextField)
                .addContainerGap(748, Short.MAX_VALUE))
            .addComponent(jSeparator2, javax.swing.GroupLayout.DEFAULT_SIZE, 774, Short.MAX_VALUE)
            .addGroup(panelUtamaLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(judulTabelGedungLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(696, Short.MAX_VALUE))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelUtamaLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 754, Short.MAX_VALUE)
                .addContainerGap())
            .addGroup(panelUtamaLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(panelUtamaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, panelUtamaLayout.createSequentialGroup()
                        .addComponent(meetingRoomLabel)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 87, Short.MAX_VALUE)
                        .addComponent(meetingRoomTotalIncomeLabel))
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, panelUtamaLayout.createSequentialGroup()
                        .addComponent(ballRoomLabel)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 108, Short.MAX_VALUE)
                        .addComponent(ballRoomTotalIncomeLabel))
                    .addGroup(panelUtamaLayout.createSequentialGroup()
                        .addComponent(commonTextField)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 119, Short.MAX_VALUE)
                        .addGroup(panelUtamaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(vvipTotalIncomeLabel)
                            .addComponent(vipTotalIncomeLabel)
                            .addComponent(commonTotalIncomeLabel))))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 319, Short.MAX_VALUE)
                .addGroup(panelUtamaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelUtamaLayout.createSequentialGroup()
                        .addComponent(totalKamarLabel)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(kamarTotalIncomeLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 114, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelUtamaLayout.createSequentialGroup()
                        .addComponent(totalLabel)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(gedungTotalIncomeLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 112, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
            .addGroup(panelUtamaLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(kembali_button, javax.swing.GroupLayout.PREFERRED_SIZE, 208, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(556, Short.MAX_VALUE))
        );
        panelUtamaLayout.setVerticalGroup(
            panelUtamaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelUtamaLayout.createSequentialGroup()
                .addGroup(panelUtamaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(labelGambar)
                    .addGroup(panelUtamaLayout.createSequentialGroup()
                        .addGap(121, 121, 121)
                        .addComponent(titleLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(panelUtamaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(panelUtamaLayout.createSequentialGroup()
                        .addGroup(panelUtamaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(tanggalTransaksiLabel)
                            .addComponent(tanggalTransaksiChooser, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addComponent(judulTabelLabel))
                    .addComponent(laporanHarianButton))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(panelUtamaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(vvipTextField)
                    .addComponent(vvipTotalIncomeLabel))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panelUtamaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(vipTextField)
                    .addComponent(vipTotalIncomeLabel))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panelUtamaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(panelUtamaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(commonTotalIncomeLabel)
                        .addComponent(kamarTotalIncomeLabel)
                        .addComponent(totalKamarLabel))
                    .addComponent(commonTextField))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(judulTabelGedungLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 89, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(panelUtamaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(ballRoomLabel)
                    .addComponent(ballRoomTotalIncomeLabel))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(panelUtamaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(meetingRoomLabel)
                    .addComponent(meetingRoomTotalIncomeLabel)
                    .addComponent(gedungTotalIncomeLabel)
                    .addComponent(totalLabel))
                .addGap(27, 27, 27)
                .addComponent(kembali_button)
                .addContainerGap())
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(panelUtama, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(panelUtama, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
        );

        pack();
        java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
        java.awt.Dimension dialogSize = getSize();
        setLocation((screenSize.width-dialogSize.width)/2,(screenSize.height-dialogSize.height)/2);
    }// </editor-fold>//GEN-END:initComponents

    private void kembali_buttonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_kembali_buttonActionPerformed
        this.dispose();
        MainController.getFrame().setVisible(true);
    }//GEN-LAST:event_kembali_buttonActionPerformed

    private void laporanHarianButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_laporanHarianButtonActionPerformed
        // TODO add your handling code here:
        MakeReportController.laporanHarian(this, tanggalTransaksiChooser, kamarTable, gedungTable,
                vvipTotalIncomeLabel, vipTotalIncomeLabel, commonTotalIncomeLabel, kamarTotalIncomeLabel,
                ballRoomTotalIncomeLabel, meetingRoomTotalIncomeLabel, gedungTotalIncomeLabel);
    }//GEN-LAST:event_laporanHarianButtonActionPerformed

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel ballRoomLabel;
    private javax.swing.JLabel ballRoomTotalIncomeLabel;
    private javax.swing.JLabel commonTextField;
    private javax.swing.JLabel commonTotalIncomeLabel;
    private javax.swing.JTable gedungTable;
    private javax.swing.JLabel gedungTotalIncomeLabel;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JSeparator jSeparator1;
    private javax.swing.JSeparator jSeparator2;
    private javax.swing.JLabel judulTabelGedungLabel;
    private javax.swing.JLabel judulTabelLabel;
    private javax.swing.JTable kamarTable;
    private javax.swing.JLabel kamarTotalIncomeLabel;
    private javax.swing.JButton kembali_button;
    private javax.swing.JLabel labelGambar;
    private javax.swing.JButton laporanHarianButton;
    private javax.swing.JLabel meetingRoomLabel;
    private javax.swing.JLabel meetingRoomTotalIncomeLabel;
    private javax.swing.JPanel panelUtama;
    private com.toedter.calendar.JDateChooser tanggalTransaksiChooser;
    private javax.swing.JLabel tanggalTransaksiLabel;
    private javax.swing.JLabel titleLabel;
    private javax.swing.JLabel totalKamarLabel;
    private javax.swing.JLabel totalLabel;
    private javax.swing.JLabel vipTextField;
    private javax.swing.JLabel vipTotalIncomeLabel;
    private javax.swing.JLabel vvipTextField;
    private javax.swing.JLabel vvipTotalIncomeLabel;
    // End of variables declaration//GEN-END:variables
}
